package com.ruoyi.web.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.web.domain.WorkForm;
import com.ruoyi.web.domain.dto.FormExportFilterDto;
import com.ruoyi.web.domain.dto.WorkFormDto;
import com.ruoyi.web.domain.dto.WorkFormExportDto;
import com.ruoyi.web.domain.vo.HistogramVo;
import com.ruoyi.web.domain.vo.PieChartVo;
import com.ruoyi.web.domain.vo.WorkFormVo;

import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 工单表 服务类
 * </p>
 *
 * @author
 * @since 2025-03-10
 */
public interface WorkFormService extends IService<WorkForm> {

    void infoDeptApply(WorkFormDto dto);

    WorkFormVo getDetail(String baseId);

    void generalDeptSend(WorkFormDto dto);

    void reviewSending(WorkFormDto dto);

    AjaxResult confirmSent(String baseId);

    List<WorkForm> workFormList(WorkFormDto dto);

    boolean dealWorkForm(WorkFormDto dto);

//    void generateDocument(WorkFormExportDto dto, OutputStream outputStream) throws Exception;

    void generateDocument(WorkFormExportDto dto, HttpServletResponse response) throws Exception;

    /**
     * 获取各诉求类型计数（大屏）
     */
    HistogramVo getAppealTypesCount(String province, String city, String county);

    /**
     * 获取各服务等级计数（大屏）
     */
    List<PieChartVo> getServiceGradesCount(String province, String city, String county);

    /**
     * 获取问题总数、已办结数以及办结率（大屏）
     */
    Map<String, Object> getCounts(String province, String city, String county);

    /**
     * 获取各服务状态计数（大屏）
     */
    List<PieChartVo> getServiceStatesCount(String province, String city, String county);

    /**
     * 获取企业满意度比例（大屏）
     */
    List<PieChartVo> getEnterpriseSatisfactionRatio(String province, String city, String county);

    /**
     * 获取各地市诉求数量计数（大屏）
     */
    HistogramVo getCitiesAppealQuantityCount(String province, String city, String county);

    Map workFormStatistic(FormExportFilterDto dto);

    void sendBatch(WorkFormDto dto);

    Map<String, Long> dataStatistics();

    void updateWorkForm(WorkFormDto dto);

    void uploadSupplement(WorkFormDto dto);

    boolean isDuplicatedWorkForm(String param);

    void updateStatus(WorkFormDto dto);
}